﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.RoboticOperationMerge.CUiROMDataUtils
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System.Drawing;
using Tecnomatix.Engineering.Ui;


namespace DnProcessSimulateCommands.RoboticOperationMerge;

internal class CUiROMDataUtils
{
  public const string targetOperationColName = "TargetOperation";
  public const string matchColName = "Match";
  public const string distanceColName = "Distance";
  public const string mergeColName = "Merge";
  public const string mergeSchemaColName = "MergeSchema";
  public const string sourceOperationColName = "SourceOperation";
  public const string SOURCE_OPER_NORMAL_STYLE = "sourceOperationNormalStyle";
  public const string SOURCE_OPER_SELECT_STYLE = "sourceOperationSelectStyle";
  public const string SOURCE_LOC_NORMAL_STYLE = "sourceLocationNormalStyle";
  public const string SOURCE_LOC_SELECT_STYLE = "sourceLocationSelectStyle";
  public const string SOURCE_GRAYED_LOC_NORMAL_STYLE = "sourceGrayedLocationNormalStyle";
  public const string SOURCE_GRAYED_LOC_SELECT_STYLE = "sourceGrayedLocationSelectStyle";
  public const string TARGET_OPER_NORMAL_STYLE = "targetOperationNormalStyle";
  public const string TARGET_OPER_SELECT_STYLE = "sourceOperationSelectStyle";
  public const string TARGET_LOC_NORMAL_STYLE = "targetLocationNormalStyle";
  public const string TARGET_LOC_SELECT_STYLE = "targetLocationSelectStyle";
  public const string TARGET_GRAYED_LOC_NORMAL_STYLE = "targetGrayedLocationNormalStyle";
  public const string TARGET_GRAYED_LOC_SELECT_STYLE = "targetGrayedLocationSelectStyle";
  public const string COL_MATCH_NORMAL_STYLE = "matchColumnNormalStyle";
  public const string COL_MATCH_SELECT_STYLE = "matchColumnSelectStyle";
  public const string COL_DISTANCE_NORMAL_STYLE = "distanceColumnNormalStyle";
  public const string COL_DISTANCE_SELECT_STYLE = "distanceColumnSelectStyle";
  public const string COL_MERGE_NORMAL_STYLE = "mergeColumnNormalStyle";
  public const string COL_MERGE_SELECT_STYLE = "mergeColumnSelectStyle";
  public const double DISTANCE_THRESHOLD = 0.25;
  public const double MATCH_EPSILON = 0.001;
  public static string SOURCE_STATUS_COLOR = "Emphasize5";
  public static string TARGET_STATUS_COLOR = "Info";
  public static string GRAY_STATUS_COLOR = "Emphasize4";
  public const string PICK_OPERATION_TYPE = "PICK_OPERATION_TYPE";
  public const string PLACE_OPERATION_TYPE = "PLACE_OPERATION_TYPE";

  public static Color FORECOLOR_TARGET_OPERATION
  {
    get => TxStatusColor.TextWithoutBackground(CUiROMDataUtils.TARGET_STATUS_COLOR);
  }

  public static Color FORECOLOR_TARGET_LOCATION
  {
    get => TxStatusColor.TextWithoutBackground(CUiROMDataUtils.TARGET_STATUS_COLOR);
  }

  public static Color FORECOLOR_TARGET_GRAYED_LOCATION
  {
    get => TxStatusColor.TextWithoutBackground(CUiROMDataUtils.GRAY_STATUS_COLOR);
  }

  public static Color FORECOLOR_MATCHED_LOCATION
  {
    get => TxStatusColor.TextWithoutBackground(CUiROMDataUtils.SOURCE_STATUS_COLOR);
  }

  public static Color FORECOLOR_SOURCE_OPERATION
  {
    get => TxStatusColor.TextWithoutBackground(CUiROMDataUtils.SOURCE_STATUS_COLOR);
  }

  public static Color FORECOLOR_SOURCE_LOCATION
  {
    get => TxStatusColor.TextWithoutBackground(CUiROMDataUtils.SOURCE_STATUS_COLOR);
  }

  public static Color FORECOLOR_SOURCE_GRAYED_LOCATION
  {
    get => TxStatusColor.TextWithoutBackground(CUiROMDataUtils.GRAY_STATUS_COLOR);
  }

  public static CUiROMDataUtils.CellState ClearCellState(
    CUiROMDataUtils.CellState currentStates,
    CUiROMDataUtils.CellState stateToClear)
  {
    return currentStates & (CUiROMDataUtils.CellState.All ^ stateToClear);
  }

  public static CUiROMDataUtils.ManualSelection ClearManualSelection(
    CUiROMDataUtils.ManualSelection currentSelectionKeys,
    CUiROMDataUtils.ManualSelection selectionKeyToClear)
  {
    return currentSelectionKeys & (CUiROMDataUtils.ManualSelection.CtrlShift ^ selectionKeyToClear);
  }

  public enum MergeSchema
  {
    LocDefault,
    LocAlternative,
    Via,
    Operation,
  }

  public enum AutomaticMatchCriteria
  {
    MatchByName,
    MatchByDistance,
    MatchByDistanceWithMaxDeviation,
  }

  public enum CellStyleCategory
  {
    Normal,
    Select,
    Focus,
    Edit,
    Pick,
    TypeValid,
    TypeInvalid,
  }

  public enum CellState
  {
    NotSet = 0,
    Normal = 1,
    Selected = 2,
    Focused = 4,
    SelectedFocused = 6,
    Edited = 8,
    SelectedEdited = 10, // 0x0000000A
    FocusedEdited = 12, // 0x0000000C
    SelectedFocusedEdited = 14, // 0x0000000E
    All = 15, // 0x0000000F
  }

  public enum ManualSelection
  {
    None,
    Single,
    Toggle,
    Ctrl,
    Shift,
    CtrlShift,
  }

  public enum NodeType
  {
    ObjectFlowOperation,
    WeldOperation,
    MountedWorkpieceOperation,
    ContinuousOperation,
    SeamOperation,
    GenericRoboticOperation,
    ViaLocation,
    WeldLocation,
    UnprojectedWeldLocation,
    SeamLocation,
    GenericLocation,
    ObjectFlowLocation,
    PickLocation,
    PlaceLocation,
    NotSet,
  }
}
